package wang.chunfan.springcloud.learning.sentinel.server.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import wang.chunfan.springcloud.learning.sentinel.server.feign.fallback.UserFeignFallback;
import wang.chunfan.springcloud.learning.sentinel.server.model.Result;
import wang.chunfan.springcloud.learning.sentinel.server.model.User;

/**
 * @version 1.0
 * @Author wangchunfan
 * @Date 2020/5/28 10:08
 **/
@FeignClient(value = "nacos-user-server", fallback = UserFeignFallback.class)
public interface UserFeign {
    @GetMapping("/user/{id}")
    Result<User> get(@PathVariable Long id);
}
